package com.ruoyi.common.mybatisplus.core;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;

/**
 * Tree基类
 * 
 * @author ruoyi
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class TreeEntity extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 父菜单名称 */
    @TableField(exist = false)
    private String parentName;

    /** 父菜单ID */
    private Long parentId;

    /** 显示顺序 */
    @NotBlank(message = "显示顺序不能为空")
    private Integer orderNum;

    /** 祖级列表 */
    private String ancestors;
}